package cn.cjp.m3d27;

import java.util.ArrayList;
import java.util.Iterator;

public class aGeneric {
    public static void main(String[] args) {

        ArrayList<String> list1 = new ArrayList<>();
        list1.add("add");
        list1.add("bbb");
        list1.add("ccc");
printlnarray(list1);

    }

    public static void printlnarray(ArrayList <?> list){
        Iterator<?> it = list.iterator();
        while(it.hasNext()){
            System.out.println(it.next());
        }
    }
}
